package com.zjr.domain;

import java.util.*;

/**
 * 用户类实体
 * */
public class User {
	private int uid;			//用户id
	private String username;	//用户名
	private String password;	//密码
	private int did;			//用户所属部门id
	private String phone;		//号码
	private String address;		//地址
	private int role;			//用户角色等级
	
	//员工所提交的日志
	private Set<Log> logs = new HashSet<Log>();

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getDid() {
		return did;
	}

	public void setDid(int did) {
		this.did = did;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getRole() {
		return role;
	}

	public void setRole(int role) {
		this.role = role;
	}
	
	public Set<Log> getLogs() {
		return logs;
	}

	public void setLogs(Set<Log> logs) {
		this.logs = logs;
	}

	public User() {
		super();
	}

	public User(int uid, String username, String password, int did, String phone, String address, int role,
			Set<Log> logs) {
		super();
		this.uid = uid;
		this.username = username;
		this.password = password;
		this.did = did;
		this.phone = phone;
		this.address = address;
		this.role = role;
		this.logs = logs;
	}

	@Override
	public String toString() {
		return "User [uid=" + uid + ", username=" + username + ", password=" + password + ", did=" + did + ", phone="
				+ phone + ", address=" + address + ", role=" + role + ", logs=" + logs + "]";
	}
	
	
}
